requirejs.config({
    baseUrl: './',
    paths: {
        'jquery': 'lib/jquery/jquery',
        'jquery.alpha': 'lib/jquery-plugins/jquery.alpha',
        "h5plus.toolkit": "app/modules/h5plus.toolkit",
        "h5plus.dya.script": "app/modules/h5plus.dya.script",
        "h5plus.config": "app/modules/h5plus.config",
        "h5plus.aggregate": "app/modules/h5plus.aggregate",
        "h5plus.judge": "app/modules/h5plus.judge",
        "ut.event.binder": "app/modules/ut.event.binder",
        "ut.logUploader": "app/modules/ut.logUploader",
        "h5plus.metainfo": "app/modules/h5plus.metainfo",
        "h5plus.pandora": "app/modules/h5plus.pandora",
        "h5plus.storage": "app/modules/h5plus.storage",
        "wx.info.inject": "app/modules/wx.info.inject",
        "ut.item.wrapper": "app/modules/ut.item.wrapper",
        "h5plus.rmr.util": "app/modules/h5plus.rmr.util"
    },
    shim: {
        'jquery.alpha': {
            deps: ['jquery'],
        },
        'jquery.beta': {
            deps: ['jquery']
        }
    },
    // pkgs: [{
    //     name:'modules',
    //     location: 'app/modules',
    //     main: 'core'
    // }]
});
requirejs([
    'jquery',
    'jquery.alpha',
    'h5plus.toolkit',
	'h5plus.dya.script',
	'h5plus.config',
	'h5plus.aggregate',
	'ut.event.binder',
	'ut.logUploader',
    'h5plus.judge', /* 业务级别模块 */
], function($, alpha, toolkit, scriptManager, config, aggregate, binder, logloader) {
    $(function() {
        $("#sampletitle").alpha();
    });

    'use strict';
	//处理ip和地区
	var paths = config.paths;
	scriptManager.loadScript(paths.netInfoPath, function() {
		var netInfo = window.h5NetInfo;
		aggregate.ip = netInfo.ip;
		aggregate.country = netInfo.country;
		aggregate.province = netInfo.province;
		aggregate.city = netInfo.city;
    });
    logloader.run();
    binder.runScroll();
    binder.runClick();
    binder.runView();
    //保存piwikid、应用平台标识、是否是微信网页应用标识、微信网页应用的pid和weixin_id所在meta
	window.h5event = toolkit;
});